package com.itcast.interfacedemo.Demo02;

import java.util.ArrayList;

/*
要写注释哦!!!
*/
public class StudentManager2 {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentInter studentInter2 = new StidentInterImpl2();

    public StudentManager2() {
        students.add(new Student("张三", '男', 78));
        students.add(new Student("李四", '女', 96));
        students.add(new Student("王五", '男', 69));
        students.add(new Student("小紫", '女', 85));
        students.add(new Student("小兰", '男', 72));
        students.add(new Student("小红", '女', 93));
    }

    public void printInfo() {
        studentInter2.printAllInfo(students);
    }

    public void printAverage() {
        studentInter2.printAveragerScore(students);
    }
}
